

package com.hexinfo.dmpro.dev.data.transfer.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hexinfo.dmpro.common.base.PageResult;
import com.hexinfo.dmpro.dev.data.transfer.model.DevDataExportTask;
import com.hexinfo.dmpro.dev.data.transfer.model.FtpTakeUp;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * 总导出任务表
 *
 * @author yyh.huang
 * @date 2023-10-25 19:16:06
 */
public interface IDevDataExportTaskService extends IService<DevDataExportTask> {

    PageResult queryList(Page page, DevDataExportTask devDataExportTask);

    List<DevDataExportTask> queryListNoPage(DevDataExportTask devDataExportTask);

    void createExportTask(DevDataExportTask devDataExportTask);

    int modifySuccessNumByTaskCode(String taskCode);

    int modifyFailNumByTaskCode(String taskCode);

    int reduceSuccessNumByTaskCode(String taskCode);

    int reduceFailNumByTaskCode(String taskCode);

    int modifyStatusByTaskCode(String taskCode, String endTime);

    void removeDataFileById(String id);

    // 批量物理删除数据文件
    void batchRemoveDataFileByIds(List<String> ids);

    // 逻辑删除数据文件
    void logicRemoveDataFileById(String id);

    void countFileSize(String taskCode);

    // 批量逻辑删除数据文件
    void batchLogicRemoveDataFileById(List<String> ids);

    DevDataExportTask queryByTaskCode(String taskCode);

    String importFromExcel(MultipartFile file);

    void continueRunById(String id);

    void suspend(List<String> ids);

    void abolish(List<String> ids);

    void restart(List<String> ids);

    void reset(List<String> ids);

    /**
     * @Method countFtpTakeUp
     * @Param
     * @Return void
     * @Description 统计FTP空间占用
     * @Author Wang zhihao
     * @Date 2024/1/3 14:55
     * @Version V1.0
     */
    FtpTakeUp countFtpTakeUp();

    /**
     * @Method removeById
     * @Param 
     * @param id 
     * @Return 根据ID删除
     * @Description
     * @Author Wang zhihao
     * @Date 2024/1/15 10:50
     * @Version V1.0
     */
    void deleteById(String id);

    /**
     * @Method removeByIds
     * @Param
     * @param ids
     * @Return void
     * @Description 批量根据ID删除
     * @Author Wang zhihao
     * @Date 2024/1/3 17:46
     * @Version V1.0
     */
    void removeByIds(List<String> ids);
}
